package com.voice.call.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.voice.call.common.Const;
import com.voice.call.common.ConstLang;
import com.voice.call.common.Result;
import com.voice.call.service.GlobalConfigService;
import com.voice.call.utils.JSONUtil;
import com.voice.call.version.ApiVersion;

//静态配置
@RestController
@RequestMapping("/api/{version}/config/")
public class GlobalConfigController {
	
	private final Logger log = LoggerFactory.getLogger(GlobalConfigController.class);
	
	@Resource
	private GlobalConfigService globalConfigService;
	
	@ResponseBody
	@ApiVersion(1)
	@RequestMapping(value = "list", method = RequestMethod.POST, produces = Const.JSON_UTF8)
	public Result list(@RequestBody Map<String, Object> params) {
		//log.debug("参数:{}",JSONUtil.objectToJson(params));
		return globalConfigService.getGlobalConfirList();
	}

}
